Primary exercises

Use \({\small \;\;{\%}{>}{\%}\;\;} \) as much as possible in your solutions.

In the survey dataset:

  1. Right-handedness
  • How many individuals are right handed?

  • Are there more right-handed males than females?

  1. Count the number of females who never smoke. Do the same for males.

  2. Produce the percentages of female and male non-smokers.

  3. The variables pulse, height and m.i have missing values (NA).

  • Count for each variable number of missing (NA). Use the function is.na (ref) as a condition to find the missing values.

  • The variables height and m.i have the same amount of missing (NA), is it the case that these missing values are in the same observations (rows), i.e. that if height is missing then also m.i is missing at the same row?

Extra exercises

  1. What is the maximum female height in inch units from the survey dataset?

  2. What is right-handedness percentage in females who frequently exercise? What about males?



Copyright © 2021 Biomedical Data Sciences (BDS) | LUMC